#ifndef __CP_INFO_H__
#define __CP_INFO_H__
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
using namespace std;

class cp_info {
public:
	char tag;
public:
	static cp_info* create(char* &buffer);
};
class constant_class_info : public cp_info {
public:
	short name_index;
};
class constant_fieldref_info : public cp_info {
public:
	short class_index;
	short name_and_type_index;
};
class constant_methodref_info : public cp_info {
public:
	short class_index;
	short name_and_type_index;
};
class constant_interfacemethodref_info : public cp_info {
public:
	short class_index;
	short name_and_type_index;
};
class constant_string_info : public cp_info {
public:
	short string_index;
};
class constant_integer_info : public cp_info {
public:
	int bytes;
};
class constant_float_info : public cp_info {
public:
	int bytes;
};
class constant_long_info : public cp_info {
public:
	int high_bytes;
	int low_bytes;
};
class constant_double_info : public cp_info {
public:
	int high_bytes;
	int low_bytes;
};
class constant_nameandtype_info : public cp_info {
public:
	short name_index;
	short descriptor_index;
};
class constant_utf8_info : public cp_info {
public:
	short length;
	wstring bytes;
};


#endif